package com.heima.apis.schedule;

import com.heima.model.schedule.dtos.Task;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-schedule")
public interface ITaskClient {

    @PostMapping("/api/v1/task/addtask")
    void addTask(@RequestBody Task task);

    @GetMapping("/api/v1/task/polltask/{taskType}/{taskpriority}")
    Task pollTask(@PathVariable("taskType") Integer taskType, @PathVariable("taskpriority") Integer priority);
}
